package com.leenmvc.core.security.service.core;

import com.leenmvc.core.annotation.TransactionMulti;
import com.leenmvc.core.base.BaseService;
import com.leenmvc.core.exception.BusinessException;
import com.leenmvc.core.security.dao.core.SysFileUploadDao;
import com.leenmvc.core.security.entity.core.SysFileUpload;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class SysFileUploadService extends BaseService<SysFileUpload> {

    @Autowired
    private SysFileUploadDao sysFileUploadDao;

    @Override
    @TransactionMulti
    public boolean deleteById(Object id) {
        if (!sysFileUploadDao.deleteById(id)){
            throw new BusinessException("文件删除失败！");
        }
        return true;
    }
}
